<!-- $Id: addTag.html 50 2011-02-28 09:59:08Z nicholasinlove1986@gmail.com $ -->
<include file="Public:pageheader"/>
<load href="__PUBLIC__/Js/validator.js" />
<script language="javascript">
/**
* 根据标签名称转换编码
*/
$(function(){
	$('#title').blur(function(){
		//$('#tag_url').val(encodeURIComponent($('#title').val()));
		$('#tag_url').val(encodeURIComponent($('#title').val().replace(/[ ]/g,"-")));
	});
});

/**
* 检查表单输入的数据
*/
function validate()
{
	validator = new Validator("theForm");	
	validator.required("tag_name","{$Think.lang.js_tag_name}");
	validator.required("tag_url","{$Think.lang.js_tag_url}");
	return validator.passed();
}
</script>
<!-- start add new tag form -->
<div class="main-div">
  <form action="__URL__/insertTag" method="post" name="theForm" onsubmit="return validate();">
  <table width="100%">
      <tr>
        <td width="50%" class="label">{$Think.lang.tag_name}:</td>
        <td width="50%">
          <input type='text' name='tag_name' maxlength="20" size='17' id="title" /><span class="require-field">*</span>
        </td>
      </tr>
      <tr class="label">
        <td class="label"><a href="javascript:showNotice('url');" title="{$Think.lang.notic}"><img src="__PUBLIC__/Images/notice.gif" width="16" height="16" border="0"></a> {$Think.lang.tag_url}:</td>
        <td><input type="text" size="40" name="tag_url" id="tag_url" /><span class="require-field">*</span><br /><span class="notice-span" style="display:block" id="url">{$Think.lang.tag_url_notic}:<br />{&blog_domain}tag/dota/<br />{&blog_domain}index.php/tag/dota/<br />{&blog_domain}index.php?s=/tag/dota/</span>
        </td>
      </tr>
	  <td colspan="2" class="label">
	  <div class="button-div">
        <input type="submit" value=" {$Think.lang.submit} " class="button"/>
        <input type="reset" value=" {$Think.lang.reset} " class="button"/>
		<input type="hidden" name="act" value="do" />
      </div>
	  </td>
	  </tr>
      </table> 
  </form>
</div>
<!-- end add new tag form -->
<include file="Public:pagefooter"/> 